/**
 * Created by Chris on 14/12/30.
 */

//require([''], function(){
define(['text!template/userTagSelector.html', 'jquery'], function(viewTemplate, $){
//    console.log(viewTemplate);

    return {
        show: function(options){
            var defaultOptions = {
                "id": "userTagSelector"
            };
            options = $.extend(defaultOptions, options);

            var $view = $(options.id);
            if ( $view.length>0){
                console.log("already exist!!");
            }else{
                $view  = $(viewTemplate);
                $view.attr('id', options.id);
                $view.find('');
                console.log("id="+$(options.id));
                $(document).add($view);
            }
            $view.modal({});

            $view.on('hidden.bs.modal', function (e) {
                // do something...
                console.log("hidden!");

            })
        }

    }



});